package com.hbx.msmservice.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @Author hbx
 * @Date 2023/10/14 17:24
 */
@Component
public class MailConfigUtils implements InitializingBean {//读取配置内容

    @Value("${hbx.mail.user}")
    private String mailUser;

    @Value("${hbx.mail.password}")
    private String mailPassword;

    public static String MAIL_USER;
    public static String MAIL_PASSWORD;

    @Override
    public void afterPropertiesSet() throws Exception {
        MAIL_USER = this.mailUser;
        MAIL_PASSWORD = this.mailPassword;
    }
}
